<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>分类信息</title>
    <link rel="stylesheet" href="/web/layui/css/layui.css">
    <link rel="stylesheet" href="/web/static/css/style.css">
    <link rel="stylesheet" href="/web/static/css/cate.css">
    <link rel="icon" href="/web/static/image/code.png">
</head>
<body class="body">

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
    <ul class="layui-tab-title">
        <li class="layui-this">分类信息</li>
        <li>关键词</li>

        <a class="layui-btn layui-btn-small layui-btn-default add" style="
                       margin-left: 10px;">添加</a>
        <a class="layui-btn btn-add layui-btn-primary btn-refresh" id="btn-refresh"><i class="layui-icon">&#x1002;</i></a>
   </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
           <div>
               <table id="cate" lay-filter="cate"></table>
           </div>
        </div>
        <div class="layui-tab-item">
            <div>
                <table id="keyword" lay-filter="keyword"></table>
            </div>
        </div>
    </div>
</div>

</body>
<!-- 分类弹框 -->
<div class="add_cate" >
    <form class="layui-form max-auto" action="" onclick="return false">

        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-block">
                <input type="text" name="cate_name" required lay-verify="required" placeholder="请输入分类名称"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="add_cate">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<div class="up_cate" >
    <form class="layui-form max-auto" action="" onclick="return false">
        <input type="hidden" name="cate_id" id="cate_id" value="">
        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-block">
                <input type="text" name="cate_name" id="cate_name" required lay-verify="required" placeholder="请输入分类名称"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="up_cate">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<!-- 关键词弹框 -->
<div class="add_keyword" >
    <form class="layui-form max-auto" action="" onclick="return false">
        <div class="layui-form-item">
            <label class="layui-form-label">分类:</label>
            <div class="layui-input-block">
                <select name="cate_id" lay-verify="required">
                    <?php if(!empty($cateinfo)): ?>
                        <?php $__currentLoopData = $cateinfo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value='<?php echo e($value['id']); ?>'><?php echo e($value['cate_name']); ?>  &nbsp;  &nbsp;</option >
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">关键词</label>
            <div class="layui-input-block">
                <input type="text" name="keyword" required lay-verify="required" placeholder="请输入关键词"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="add_key">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<div class="up_keyword" >
    <form class="layui-form max-auto" action="" onclick="return false">
        <input type="hidden" name="key_id" id="key_id" value="">
        <div class="layui-form-item">
            <label class="layui-form-label">分类:</label>
            <div class="layui-input-block" class="cate" >
                <select name="cate_id" id="cate_select" lay-verify="required">
                    <?php if(!empty($cateinfo)): ?>
                        <?php $__currentLoopData = $cateinfo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value='<?php echo e($value['id']); ?>'><?php echo e($value['cate_name']); ?>  &nbsp;  &nbsp;</option >
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">关键词</label>
            <div class="layui-input-block">
                <input type="text" name="keyword" id="up_keyword" required lay-verify="required" placeholder="请输入关键词"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="up_key">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<!-- 关键词表格操作按钮集 -->
<script type="text/html" id="keyword_tool">
    <a class="layui-btn layui-btn-small layui-btn-primary tool-btn" lay-event="keyword_update">更改</a>
</script>

<!-- 分类表格操作按钮集 -->
<script type="text/html" id="cate_tool">
    <a class="layui-btn layui-btn-small layui-btn-primary tool-btn" lay-event="cate_update">更改</a>
</script>

<input type="hidden" name="_token" id="_token" value="<?php echo csrf_token(); ?>">
<script type="text/javascript" src="/web/layui/layui.js"></script>
<script type="text/javascript" src="/web/index.js"></script>
<script type="text/javascript" src="/web/static/js/cate/cate.js"></script>


</html>